<template>
  <div class="grandSon">
    <h1>grandSon - grandSon - grandSon - 祖传孙</h1>
    <div class="s">{{ `父亲给孙子的：房子：${f.hourse || '--'}套,资产：${f.money}` }}</div>
    <button @click="updateMoney(10)">修改组的money</button>
    {{ $attrs }}
    <input type="number" v-model="msg" @input="changeVal">
  </div>
  <VxeTabe></VxeTabe>
</template>

<script setup lang='ts' name="grandSon">
import VxeTabe from './VxeTabe.vue'
import { inject, ref } from 'vue';
defineProps(['num'])
// 组传孙
// let f = inject('fatherAll', {
//   hourse: '默认值：1000',
//   money: '默认值：1000000'
// })
let { f, updateMoney } = inject('fatherAllContext', { f: {}, updateMoney: (params: number) => { } })
let msg = ref('')
function changeVal(val: any) {
  msg.value = val.target.value
}
</script>
<style scoped>
.grandSon {
  width: 100%;
  height: 30vh;
  background-color: aquamarine;
  border: 1px solid red;
  font-size: 28px;
}
</style>